﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace MiniErp.Entity.DataStreams.DOs.AssetManagement
{
    /// <summary>
    /// 资产总类别实体
    /// </summary>
    [Table("GeneralType")]
    public class GeneralType : BaseEntity
    {
        /// <summary>
        /// 资产总类型编号
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [ConcurrencyCheck]
        public int GeneralTypeId { get; set; }

        /// <summary>
        /// 资产总类型名
        /// </summary>
        [MaxLength(20, ErrorMessage = "资产总类型名不能超过20个字符")]
        [Required]
        public string GeneralTypeName { get; set; }

        /// <summary>
        /// 资产总类型备注
        /// </summary>
        public string GeneralTypeRemarks { get; set; }
        #region 导航属性
        public virtual List<AssetInfo> AssetInfos { get; set; }
        #endregion
    }
}